CONTENTS | INDEX | PREV | NEXT
feof
NAME
feof - return EOF condition for file pointer
SYNOPSIS
#include <stdio.h>
int r = feof(fp); (MACRO)
FILE *fp;
FUNCTION
feof returns the EOF status of a file pointer. The status is
not changed by this macro. 0 is returned if no EOF condition
exists, non-zero if an EOF condition exists (NOT necessarily
1 or -1, just non-zero).
use clearerr() to clear the EOF condition. Also, fseek() and
rewind() also clear an EOF condition.
NOTE
refer to the file_pointer manual page for general information
INPUTS
FILE *fp; file pointer
RESULTS
int r; 0 if no EOF condition exists, != 0 if an EOF
condition exists (not necessarily 1 or -1).
SEE ALSO
fopen, fclose, fread, fwrite, fgets, fputs